<?php

return [
    'web' => [
        'GET' => [
            '/{module}/{controller}/{action}/{id?}' => [
                'action' => 'handle',
                'middleware' => [
                    'App\\Library\\Middleware\\AuthMiddleware',
                    'App\\Library\\Middleware\\LogMiddleware'
                ],
                'priority' => 10,
                'name' => 'dynamic.handle'
            ],
            '/{module}/dashboard' => [
                'action' => 'dashboard',
                'middleware' => [
                    'App\\Library\\Middleware\\AuthMiddleware'
                ],
                'priority' => 5,
                'name' => 'dynamic.dashboard'
            ]
        ],
        'POST' => [
            '/{module}/{controller}/create' => [
                'action' => 'create',
                'middleware' => [
                    'App\\Library\\Middleware\\AuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'dynamic.create'
            ]
        ],
        'PUT' => [
            '/{module}/{controller}/{action}/{id?}' => [
                'action' => 'update',
                'middleware' => [
                    'App\\Library\\Middleware\\AuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'dynamic.update'
            ]
        ],
        'DELETE' => [
            '/{module}/{controller}/{action}/{id?}' => [
                'action' => 'delete',
                'middleware' => [
                    'App\\Library\\Middleware\\AuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'dynamic.delete'
            ]
        ]
    ],
    
    'api' => [
        'GET' => [
            '/{module}/{controller}/{action}/{id?}' => [
                'action' => 'handle',
                'middleware' => [
                    'App\\Library\\Middleware\\ApiAuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'api.dynamic.handle'
            ],
            '/{module}/dashboard' => [
                'action' => 'dashboard',
                'middleware' => [
                    'App\\Library\\Middleware\\ApiAuthMiddleware'
                ],
                'priority' => 5,
                'name' => 'api.dynamic.dashboard'
            ]
        ],
        'POST' => [
            '/{module}/{controller}/create' => [
                'action' => 'create',
                'middleware' => [
                    'App\\Library\\Middleware\\ApiAuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'api.dynamic.create'
            ]
        ],
        'PUT' => [
            '/{module}/{controller}/{action}/{id?}' => [
                'action' => 'update',
                'middleware' => [
                    'App\\Library\\Middleware\\ApiAuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'api.dynamic.update'
            ]
        ],
        'DELETE' => [
            '/{module}/{controller}/{action}/{id?}' => [
                'action' => 'delete',
                'middleware' => [
                    'App\\Library\\Middleware\\ApiAuthMiddleware'
                ],
                'priority' => 10,
                'name' => 'api.dynamic.delete'
            ]
        ]
    ]
];
